function caseCallback(address){
	var counter={}
	for(var i=0;i<address.length;i++){
		var types = address[i]["types"];
		addMarker(new BMap.Point(address[i].lng,address[i].lat),{types:types})
		for(var j=0;j<types.length;j++){
			var t=types[j];
			if(!counter[t]){
				counter[t]=1;
			}else{
				counter[t]++;
			}
		}
		
	}
	layerchange()
	console.log(JSON.stringify(counter))
}

function detailCallback(address){
	var counter={"invalidaddress":0}
	for(var i=0;i<address.length;i++){
		var o = address[i];
		if(("lng" in o) && ("lat" in o)){
			if(o.lng>0 && o.lat >0){
				addMarker(new BMap.Point(o.lng,o.lat),o)
				for(var j=0;j<o.types.length;j++){
					var t=o.types[j];
					if(!counter[t]){
						counter[t]=1;
					}else{
						counter[t]++;
					}
				}			
			}else{
				//地址不合法
				counter["invalidaddress"]++;
			}			
		}else{
			//新地址,没坐标
			console.log(getAddress(o))
			fastGetPoint(getAddress(o),o.types,o);
		}
	}
	console.log(JSON.stringify(counter))
	for(var i in counter){
		if(layers[i]){
			layers[i]+="("+counter[i]+")"
		}
	}
	layers["invalidaddress"] = counter["invalidaddress"]
	authorized=true;
	layerchange()
}
